Repository navigation
Conversation
…rols - Switch Pi's generated Emacs MCP extension default exposure from direct to codemode with direct toolExposure anchors (diagnostics_baseline, get_diagnostics, get_org_heading_context) and fail-closed validation, keeping ~85% of MCP tool schemas out of every turn while enabling parallel codemode calls. - Add ai-code-pi-compose (Ctrl+G external editor viewport trigger), ai-code-pi-send-follow-up / M-<return> / ai-code-pi-send-while-busy (Alt+Enter follow-up queueing without interning bare follow-up in obarray), ai-code-pi-slash-command, and optional ai-code-pi-project-trust. - Support optional :post-start-fn composition and dynamic submit-return hook in ai-code-backends-infra to avoid duplicating prompt submission logic. - Document Pi compose/queue workflows and recommended manual Gemini setup in README.org, with ERT coverage.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Pi binds app.message.followUp to ctrl+q when it uses Windows keybindings (win32, or Linux with WSL_DISTRO_NAME/WSL_INTEROP) and to alt+enter elsewhere. The fixed Alt+Enter default typed text into Pi's editor without submitting or queueing it on those platforms. - Derive ai-code-pi-follow-up-sequence's default from the platform. - Document the platform difference and keybinding override in the docstring. - Add ERT coverage for macOS, Linux, Windows, and both WSL variables.
Resolve conflict in `ai-code-backends-infra--start-cli-session' by forwarding `(plist-get options :post-start-fn)' into the deferred launch preparation path so `:prepare-launch' and option post-start hooks compose in order. Update `test_ai-code-pi.el' for deferred launch preparation and add a composition order unit test in `test_ai-code-backends-infra.el'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve the out-of-the-box Pi (
ai-code-pi.el+ai-code-mcp-agent.el) experience—especially tool-calling accuracy and parallel batching on Gemini models, plus Pilish-inspired Emacs compose and follow-up ergonomics—while keeping startup 100% model-, credential-, and trust-neutral by default:codemodewith minimaldirectanchors (ai-code-mcp-agent.el):ai-code-mcp-agent-pi-exposuredefault from"direct"to"codemode"so Pi automatically enables its built-incodemodescript runner for parallel tool batching and keeps ~85% of Emacs MCP JSON schemas out of every turn (preventing strict-schema overload on Gemini 3+ and preserving prompt cache).diagnostics_baseline,get_diagnostics,get_org_heading_context) directly declared viaai-code-mcp-agent-pi-tool-exposure, with fail-closed validation and full customization back to"direct".ai-code-pi.el,ai-code-backends-infra.el):M-x ai-code-pi-compose: sendCtrl+G(\x07) to open Pi's external editor inai-code-editor-viewportwithout EmacsC-g(keyboard-quit) interception, refreshing MCP source context when invoked from a project buffer.M-<return>in Pi session buffers,M-x ai-code-pi-send-follow-up, andai-code-pi-send-while-busy(steerdefault vsfollowup): submit viaAlt+Enter(\e[13;3u), which sends immediately when Pi is idle and queues a follow-up when streaming or compacting (using unhyphenatedfollowupso barefollow-upis never interned intoobarrayforai-code-session-link).M-x ai-code-pi-slash-command: completion and normalization for Pi slash commands (/model,/thinking,/tree,/compact, etc.), always submitted with standard Return.ai-code-pi-project-trust: optionalapprove/no-approvestartup flag (defaultnil, honoring explicit CLI switches).README.org): document Pi's MCPcodemodedefaults, compose/follow-up workflows, and a recommended manual Gemini setup (GEMINI_API_KEY/ Vertex AI +gemini-3.1-pro-preview-customtools& Pro/Flash cycling).Test Plan
test_ai-code-pi.el+test_ai-code-mcp-agent.elPi tests):20/20passed.test/test_*.el):2018run,0new failures versus baseline.emacs -Q --batch) &checkdoc-file:0new warnings across all touched files.registerMcpServerheaders,exposure, andtoolExposure;5/5scripted manual mutations killed.